<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>IndexDB</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
    <script type="module">
        import { get, set } from 'https://cdn.jsdelivr.net/npm/idb-keyval@6/+esm';
        window.dbGet = get;
        window.dbSet = set;

        set('test','fasdf');
    </script>
</head>
<body>
    <div>
        test IndexDB
    </div>
    <!-- <script>
        var request = window.indexedDB.open('db',1);
        var db ;
        request.onsuccess= function(event){
            db = request.result;
            console.log('数据库打开成功');
        }
        request.onupgradeneeded = function(event){
            db = event.target.result;
            var objectStore;
            if(!db.objectStoreNames.contains('person')){
            objectStore = db.createObjectStore('person',{ keyPath: 'id'});
            }
            console.log('person created')
        }
    </script> -->
</body>